package com.dv.driverless.service.impl;

import java.util.List;

import com.dv.driverless.domain.EquipmentCamera;
import com.dv.driverless.mapper.EquipmentCameraMapper;
import com.dv.driverless.service.IEquipmentCameraService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 摄像头信息Service业务层处理
 *
 * @author ruoyi
 * @date 2023-04-06
 */
@Service
public class EquipmentCameraServiceImpl implements IEquipmentCameraService
{
    @Autowired
    private EquipmentCameraMapper equipmentCameraMapper;

    /**
     * 查询摄像头信息
     *
     * @param id 摄像头信息主键
     * @return 摄像头信息
     */
    @Override
    public EquipmentCamera selectEquipmentCameraById(Long id)
    {
        return equipmentCameraMapper.selectEquipmentCameraById(id);
    }

    /**
     * 查询摄像头信息列表
     *
     * @param equipmentCamera 摄像头信息
     * @return 摄像头信息
     */
    @Override
    public List<EquipmentCamera> selectEquipmentCameraList(EquipmentCamera equipmentCamera)
    {
        return equipmentCameraMapper.selectEquipmentCameraList(equipmentCamera);
    }

    /**
     * 新增摄像头信息
     *
     * @param equipmentCamera 摄像头信息
     * @return 结果
     */
    @Override
    public int insertEquipmentCamera(EquipmentCamera equipmentCamera)
    {
        return equipmentCameraMapper.insertEquipmentCamera(equipmentCamera);
    }

    /**
     * 修改摄像头信息
     *
     * @param equipmentCamera 摄像头信息
     * @return 结果
     */
    @Override
    public int updateEquipmentCamera(EquipmentCamera equipmentCamera)
    {
        return equipmentCameraMapper.updateEquipmentCamera(equipmentCamera);
    }

    /**
     * 批量删除摄像头信息
     *
     * @param ids 需要删除的摄像头信息主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentCameraByIds(Long[] ids)
    {
        return equipmentCameraMapper.deleteEquipmentCameraByIds(ids);
    }

    /**
     * 删除摄像头信息信息
     *
     * @param id 摄像头信息主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentCameraById(Long id)
    {
        return equipmentCameraMapper.deleteEquipmentCameraById(id);
    }

    /**
     * 修改摄像头状态
     * @param camera
     * @return
     */
    @Override
    public int changeCameraStatus(EquipmentCamera camera) {
        return equipmentCameraMapper.changeCameraStatus(camera);
    }
}
